﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("WebAppMenus")]
    public class Menu : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [References(typeof(Menu))]
        public long? ParentId { get; set; }

        [StringLength(50)]
        [Required(AllowEmptyStrings = false)]
        public string Name { get; set; }

        [StringLength(100)]
        public string Desc { get; set; }

        [StringLength(200)]
        public string RelativeUrl { get; set; }

        [StringLength(1000)]
        public string AbsoluteUrl { get; set; }

        [Default(typeof(int), "0")]
        public int? SortOrder { get; set; }
    }
}